/*****************************************************
Copyright (C) 2020. All rights reserved.
File name     ：SearchTree.h
Version       ：v1.0
Author        ：zhengqijun
Date          ：2020-01-13
Function List ：
Description   ：Search Tree
******************************************************/

#ifndef SEARCHTREE_H_
#define SEARCHTREE_H_

// Type Definition
struct TreeNode;
typedef int ElementType;
typedef struct TreeNode *Position;
typedef struct TreeNode *SearchTree;

// Function Lists
SearchTree MakeEmpty(SearchTree T);
int IsEmpty(SearchTree T);
Position Find(ElementType X, SearchTree T);
Position FindMin(SearchTree T);
Position FindMax(SearchTree T);
SearchTree Insert(ElementType X, SearchTree T);
SearchTree Delete(ElementType X, SearchTree T);
Position Left(Position P);
Position Right(Position P);
ElementType Retrieve(Position P);
void PreorderTraversal(SearchTree T);
void InorderTraversal(SearchTree T);
void PostorderTraversal(SearchTree T);
void LevelorderTraversal(SearchTree T);

#endif  /* SEARCHTREE_H_ */

// EOF

